<?php
include "config/koneksi.php";
$salt=$_GET['salt'];
$sql="select * from tb_pendaftar where md5(username)='".$salt."'";
$qry=mysql_query($sql);
$num_row=mysql_num_rows($qry);
if($num_row > 0){
	//ada user, update
	$hasil=mysql_fetch_array($qry);
	$sql_update="update tb_pendaftar set aktivasi_email='aktif' where id_pendaftaran='".$hasil['id_pendaftaran']."'";
	//echo $sql_update;exit;
	$qry_update=mysql_query($sql_update);
	header('location:view_aktifasi_sukses.php');
}else{
	header('location:view_aktifasi_gagal.php');
}
?>